﻿using BootstrapBlazor.Components;
using Microsoft.AspNetCore.Components.Routing;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyBlazorWinforms.Shared
{
    public partial class MainLayout
    {
        private bool UseTabSet { get; set; } = true;

        private string Theme { get; set; } = "";

        private bool IsOpen { get; set; }

        private bool IsFixedHeader { get; set; } = true;

        private bool IsFixedFooter { get; set; } = true;

        private bool IsFullSide { get; set; } = true;

        private bool ShowFooter { get; set; } = true;

        private List<MenuItem>? Menus { get; set; }

        private string AuthorUrl => "login";

        /// <summary>
        /// OnInitialized 方法
        /// </summary>
        protected override void OnInitialized()
        {
            base.OnInitialized();
            Menus = GetIconSideMenuItems();
            IsFixedFooter = false;
            IsFullSide = false;
            ShowFooter = false;
            UseTabSet = false;
        }

        private List<MenuItem> GetIconSideMenuItems()
        {
            var menus = new List<MenuItem>
            {
                new MenuItem() { Text = "Index", Icon = "fa-solid fa-fw fa-flag", Url = "/" , Match = NavLinkMatch.All},
                new MenuItem() { Text = "Counter", Icon = "fa-solid fa-fw fa-flag", Url = "/counter" , Match = NavLinkMatch.All},
                new MenuItem() { Text = "PingTool", Icon = "fa-solid fa-fw fa-flag", Url = "/pingtool" , Match = NavLinkMatch.All}
            };
            return menus;
        }
    }
}
